Optimal. Leaf size=103 \[ \frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}+\frac{4 b p q \sqrt{f g-e h} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{\sqrt{f} h}-\frac{4 b p q \sqrt{g+h x}}{h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.136962, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {2395, 50, 63, 208, 2445} \[ \frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}+\frac{4 b p q \sqrt{f g-e h} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{\sqrt{f} h}-\frac{4 b p q \sqrt{g+h x}}{h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2395
Rule 50
Rule 63
Rule 208
Rule 2445
Rubi steps
\begin{align*} \int \frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{\sqrt{g+h x}} \, dx &=\operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q (e+f x)^{p q}\right )}{\sqrt{g+h x}} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}-\operatorname{Subst}\left (\frac{(2 b f p q) \int \frac{\sqrt{g+h x}}{e+f x} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{4 b p q \sqrt{g+h x}}{h}+\frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}-\operatorname{Subst}\left (\frac{(2 b (f g-e h) p q) \int \frac{1}{(e+f x) \sqrt{g+h x}} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{4 b p q \sqrt{g+h x}}{h}+\frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}-\operatorname{Subst}\left (\frac{(4 b (f g-e h) p q) \operatorname{Subst}\left (\int \frac{1}{e-\frac{f g}{h}+\frac{f x^2}{h}} \, dx,x,\sqrt{g+h x}\right )}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{4 b p q \sqrt{g+h x}}{h}+\frac{4 b \sqrt{f g-e h} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{\sqrt{f} h}+\frac{2 \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h}\\ \end{align*}
Mathematica [A] time = 0.289237, size = 89, normalized size = 0.86 \[ \frac{2 \left (\sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-2 b p q\right )+\frac{2 b p q \sqrt{f g-e h} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{\sqrt{f}}\right )}{h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.335, size = 155, normalized size = 1.5 \begin{align*} 2\,{\frac{\sqrt{hx+g}a}{h}}+2\,{\frac{b\sqrt{hx+g}}{h}\ln \left ( c \left ( d \left ({\frac{f \left ( hx+g \right ) +eh-fg}{h}} \right ) ^{p} \right ) ^{q} \right ) }-4\,{\frac{bqp\sqrt{hx+g}}{h}}+4\,{\frac{bqpe}{\sqrt{ \left ( eh-fg \right ) f}}\arctan \left ({\frac{f\sqrt{hx+g}}{\sqrt{ \left ( eh-fg \right ) f}}} \right ) }-4\,{\frac{bfgpq}{h\sqrt{ \left ( eh-fg \right ) f}}\arctan \left ({\frac{f\sqrt{hx+g}}{\sqrt{ \left ( eh-fg \right ) f}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.52207, size = 483, normalized size = 4.69 \begin{align*} \left [\frac{2 \,{\left (b p q \sqrt{\frac{f g - e h}{f}} \log \left (\frac{f h x + 2 \, f g - e h + 2 \, \sqrt{h x + g} f \sqrt{\frac{f g - e h}{f}}}{f x + e}\right ) +{\left (b p q \log \left (f x + e\right ) - 2 \, b p q + b q \log \left (d\right ) + b \log \left (c\right ) + a\right )} \sqrt{h x + g}\right )}}{h}, \frac{2 \,{\left (2 \, b p q \sqrt{-\frac{f g - e h}{f}} \arctan \left (-\frac{\sqrt{h x + g} f \sqrt{-\frac{f g - e h}{f}}}{f g - e h}\right ) +{\left (b p q \log \left (f x + e\right ) - 2 \, b p q + b q \log \left (d\right ) + b \log \left (c\right ) + a\right )} \sqrt{h x + g}\right )}}{h}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 25.1486, size = 347, normalized size = 3.37 \begin{align*} \begin{cases} - \frac{\frac{2 a g}{\sqrt{g + h x}} + 2 a \left (- \frac{g}{\sqrt{g + h x}} - \sqrt{g + h x}\right ) + 2 b g \left (\frac{2 f p q \operatorname{atan}{\left (\frac{1}{\sqrt{\frac{f}{e h - f g}} \sqrt{g + h x}} \right )}}{\sqrt{\frac{f}{e h - f g}} \left (e h - f g\right )} + \frac{\log{\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{\sqrt{g + h x}}\right ) + 2 b \left (- \frac{2 f p q \left (- \frac{h \sqrt{g + h x}}{f} - \frac{h \operatorname{atan}{\left (\frac{1}{\sqrt{\frac{f}{e h - f g}} \sqrt{g + h x}} \right )}}{f \sqrt{\frac{f}{e h - f g}}}\right )}{h} - g \left (\frac{2 f p q \operatorname{atan}{\left (\frac{1}{\sqrt{\frac{f}{e h - f g}} \sqrt{g + h x}} \right )}}{\sqrt{\frac{f}{e h - f g}} \left (e h - f g\right )} + \frac{\log{\left (c \left (d \left (e - \frac{f g}{h} + \frac{f \left (g + h x\right )}{h}\right )^{p}\right )^{q} \right )}}{\sqrt{g + h x}}\right ) - \sqrt{g + h x} \log{\left (c \left (d \left (e - \frac{f g}{h} + \frac{f \left (g + h x\right )}{h}\right )^{p}\right )^{q} \right )}\right )}{h} & \text{for}\: h \neq 0 \\\frac{a x + b \left (- f p q \left (- \frac{e \left (\begin{cases} \frac{x}{e} & \text{for}\: f = 0 \\\frac{\log{\left (e + f x \right )}}{f} & \text{otherwise} \end{cases}\right )}{f} + \frac{x}{f}\right ) + x \log{\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )}{\sqrt{g}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25908, size = 173, normalized size = 1.68 \begin{align*} -\frac{2 \,{\left ({\left (2 \, f{\left (\frac{{\left (f g - h e\right )} \arctan \left (\frac{\sqrt{h x + g} f}{\sqrt{-f^{2} g + f h e}}\right )}{\sqrt{-f^{2} g + f h e} f} + \frac{\sqrt{h x + g}}{f}\right )} - \sqrt{h x + g} \log \left (f x + e\right )\right )} b p q - \sqrt{h x + g} b q \log \left (d\right ) - \sqrt{h x + g} b \log \left (c\right ) - \sqrt{h x + g} a\right )}}{h} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]